﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vivasky.T4Helper.Entities
{
	public class SP
	{
		public string Name;
		public string CleanName;
		public string ClassName;
		public List<SPParam> Parameters;
		public SP()
		{
			Parameters = new List<SPParam>();
		}
		public string ArgList
		{
			get
			{
				StringBuilder sb = new StringBuilder();
				int loopCount = 1;
				foreach (var par in Parameters)
				{
					sb.AppendFormat("{0} {1}", par.SysType, par.CleanName);
					if (loopCount < Parameters.Count)
						sb.Append(",");
					loopCount++;
				}
				return sb.ToString();
			}
		}
	}
}
